<?php
namespace app\admin\controller;

use app\common\model\Node as NodeModel;

/**
 * 菜单控制器
 * Class Adminuser
 * @package app\index\controller
 */
class Authrule extends Base
{
    /**
     * [index  菜单列表]
     * @return mixed|string
     * @author [C。]
     */
    public function index()
    {
        $model = new NodeModel;
        $user = $this->user;
        try{
            $list = $model->getauthmenu($user['groupid']);
        }catch(\Exception $e){
            systembug($e->getMessage(),1,'admin/Authrule/index');
            return admin_json(-1, '获取失败'.$e->getMessage());
        }
//        writelog('查看菜单列表',0,$user);
        return admin_json(1, '获取成功',$list);
    }
}